
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>表单验证 · Diboot移动端基础项目</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-anchor-navigation-ex/style/plugin.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-theme-vuejs-2/vue.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="接口数据格式.html" />
    
    
    <link rel="prev" href="过滤器.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                



<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../开始.html">
            
                <a href="../开始.html">
            
                    
                    开始
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../开始/环境准备.html">
            
                <a href="../开始/环境准备.html">
            
                    
                    环境准备
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../开始/下载项目.html">
            
                <a href="../开始/下载项目.html">
            
                    
                    下载项目
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../开始/项目配置.html">
            
                <a href="../开始/项目配置.html">
            
                    
                    项目配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../开始/启动项目.html">
            
                <a href="../开始/启动项目.html">
            
                    
                    启动项目
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../基础.html">
            
                <a href="../基础.html">
            
                    
                    基础
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="路由.html">
            
                <a href="路由.html">
            
                    
                    路由
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="过滤器.html">
            
                <a href="过滤器.html">
            
                    
                    过滤器
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.3.3" data-path="表单验证.html">
            
                <a href="表单验证.html">
            
                    
                    表单验证
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="接口数据格式.html">
            
                <a href="接口数据格式.html">
            
                    
                    接口数据格式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="页面样式管理.html">
            
                <a href="页面样式管理.html">
            
                    
                    页面样式管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="展示列表数据.html">
            
                <a href="展示列表数据.html">
            
                    
                    展示列表数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.7" data-path="展示详情数据.html">
            
                <a href="展示详情数据.html">
            
                    
                    展示详情数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.8" data-path="添加新数据.html">
            
                <a href="添加新数据.html">
            
                    
                    添加新数据
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.9" data-path="更新数据.html">
            
                <a href="更新数据.html">
            
                    
                    更新数据
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../组件.html">
            
                <a href="../组件.html">
            
                    
                    组件
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../组件/图片上传.html">
            
                <a href="../组件/图片上传.html">
            
                    
                    图片上传
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../组件/图片预览.html">
            
                <a href="../组件/图片预览.html">
            
                    
                    图片预览
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../组件/关联数据列表选择.html">
            
                <a href="../组件/关联数据列表选择.html">
            
                    
                    关联数据列表选择
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../组件/列表分页组件.html">
            
                <a href="../组件/列表分页组件.html">
            
                    
                    列表分页组件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>



                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                

                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >表单验证</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <div id="anchor-navigation-ex-navbar"><i class="fa fa-navicon"></i><ul><li><span class="title-icon "></span><a href="#&#x8868;&#x5355;&#x9A8C;&#x8BC1;"><b>1. </b>&#x8868;&#x5355;&#x9A8C;&#x8BC1;</a></li><ul><li><span class="title-icon "></span><a href="#&#x6982;&#x8FF0;"><b>1.1. </b>&#x6982;&#x8FF0;</a></li><li><span class="title-icon "></span><a href="#vee-validate&#x914D;&#x7F6E;"><b>1.2. </b>vee-validate&#x914D;&#x7F6E;</a></li><ul><li><span class="title-icon "></span><a href="#&#x4FEE;&#x6539;&#x9ED8;&#x8BA4;&#x63D0;&#x793A;"><b>1.2.1. </b>&#x4FEE;&#x6539;&#x9ED8;&#x8BA4;&#x63D0;&#x793A;</a></li><li><span class="title-icon "></span><a href="#&#x6DFB;&#x52A0;&#x81EA;&#x5B9A;&#x4E49;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;"><b>1.2.2. </b>&#x6DFB;&#x52A0;&#x81EA;&#x5B9A;&#x4E49;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;</a></li></ul><li><span class="title-icon "></span><a href="#&#x6821;&#x9A8C;&#x65B9;&#x6CD5;&#x5217;&#x8868;"><b>1.3. </b>&#x6821;&#x9A8C;&#x65B9;&#x6CD5;&#x5217;&#x8868;</a></li><ul><li><span class="title-icon "></span><a href="#vee-validate&#x5185;&#x7F6E;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;"><b>1.3.1. </b>vee-validate&#x5185;&#x7F6E;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;</a></li><li><span class="title-icon "></span><a href="#&#x81EA;&#x5B9A;&#x4E49;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;"><b>1.3.2. </b>&#x81EA;&#x5B9A;&#x4E49;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;</a></li></ul></ul></ul></div><a href="#&#x8868;&#x5355;&#x9A8C;&#x8BC1;" id="anchorNavigationExGoTop"><i class="fa fa-arrow-up"></i></a><h1 id="&#x8868;&#x5355;&#x9A8C;&#x8BC1;"><a name="&#x8868;&#x5355;&#x9A8C;&#x8BC1;" class="anchor-navigation-ex-anchor" href="#&#x8868;&#x5355;&#x9A8C;&#x8BC1;"><i class="fa fa-link" aria-hidden="true"></i></a>1. &#x8868;&#x5355;&#x9A8C;&#x8BC1;</h1>
<h2 id="&#x6982;&#x8FF0;"><a name="&#x6982;&#x8FF0;" class="anchor-navigation-ex-anchor" href="#&#x6982;&#x8FF0;"><i class="fa fa-link" aria-hidden="true"></i></a>1.1. &#x6982;&#x8FF0;</h2>
<ul>
<li>&#x5BF9;&#x8868;&#x5355;&#x7684;&#x9A8C;&#x8BC1;&#xFF0C;&#x6211;&#x4EEC;&#x5F15;&#x5165;&#x4E86;<a href="https://github.com/baianat/vee-validate" target="_blank">vee-validate&#x8868;&#x5355;&#x9A8C;&#x8BC1;&#x6A21;&#x5757;</a>&#x3002;</li>
<li>&#x4E3A;&#x4E86;&#x8868;&#x5355;&#x9A8C;&#x8BC1;&#x683C;&#x5F0F;&#x652F;&#x6301;&#x4E2D;&#x6587;&#x63D0;&#x793A;&#xFF0C;&#x6211;&#x4EEC;&#x5F15;&#x5165;&#x4E86;<a href="https://github.com/kazupon/vue-i18n" target="_blank">vue-i18n&#x6A21;&#x5757;</a>&#x3002;</li>
</ul>
<h2 id="vee-validate&#x914D;&#x7F6E;"><a name="vee-validate&#x914D;&#x7F6E;" class="anchor-navigation-ex-anchor" href="#vee-validate&#x914D;&#x7F6E;"><i class="fa fa-link" aria-hidden="true"></i></a>1.2. vee-validate&#x914D;&#x7F6E;</h2>
<ul>
<li>vee-validate&#x7684;&#x914D;&#x7F6E;&#x53CA;&#x5165;&#x53E3;&#x6587;&#x4EF6;&#x4E3A;<a href="">src/utils/validator.js</a>&#x3002;</li>
<li><a href="">src/utils/validator.js</a>&#x6587;&#x4EF6;&#x53EF;&#x4EE5;&#x914D;&#x7F6E;vee-validate&#x7684;&#x4E00;&#x7CFB;&#x5217;&#x8BBE;&#x7F6E;&#xFF0C;&#x66F4;&#x6539;&#x76F8;&#x5173;&#x6821;&#x9A8C;&#x9879;&#x7684;&#x9ED8;&#x8BA4;&#x63D0;&#x793A;&#xFF0C;&#x65B0;&#x589E;&#x81EA;&#x5B9A;&#x4E49;&#x7684;&#x6821;&#x9A8C;&#x9879;&#x7B49;&#x7B49;&#x3002;</li>
<li><a href="">validator.js</a>&#x9ED8;&#x8BA4;&#x5185;&#x5BB9;&#x5982;&#x4E0B;&#xFF1A;</li>
</ul>
<pre><code class="lang-javascript"><span class="hljs-keyword">import</span> Vue <span class="hljs-keyword">from</span> <span class="hljs-string">&apos;vue&apos;</span>;
<span class="hljs-keyword">import</span> VeeValidate, { Validator } <span class="hljs-keyword">from</span> <span class="hljs-string">&apos;vee-validate&apos;</span>;
<span class="hljs-keyword">import</span> zh_CN <span class="hljs-keyword">from</span> <span class="hljs-string">&apos;vee-validate/dist/locale/zh_CN&apos;</span>;
<span class="hljs-keyword">import</span> VueI18n <span class="hljs-keyword">from</span> <span class="hljs-string">&apos;vue-i18n&apos;</span>;

<span class="hljs-keyword">export</span> <span class="hljs-keyword">default</span> {
  init() {
    Vue.use(VueI18n);
    <span class="hljs-keyword">const</span> i18n = <span class="hljs-keyword">new</span> VueI18n({
      locale: <span class="hljs-string">&apos;zh_CN&apos;</span>,
    });

    Vue.use(VeeValidate, {
      i18n,
      i18nRootKey: <span class="hljs-string">&apos;validation&apos;</span>,
      dictionary: {
        zh_CN,
      },
    });

    <span class="hljs-keyword">this</span>.changeMessage();
    <span class="hljs-keyword">this</span>.addRules();
  },
  changeMessage() {
    <span class="hljs-keyword">const</span> dict = {
      <span class="hljs-comment">// name&#x4E3A;&#x6807;&#x7B7E;&#x503C;&#xFF08;&#x9ED8;&#x8BA4;&#x4E3A;name&#xFF0C;&#x53EF;&#x4EE5;&#x91CD;&#x547D;&#x540D;&#x5230;data-vv-as&#x5C5E;&#x6027;&#xFF09;.</span>
      zh_CN: {
        messages: {
          required: name =&gt; <span class="hljs-string">`<span class="hljs-subst">${name}</span> &#x4E0D;&#x80FD;&#x4E3A;&#x7A7A;`</span>,
          length: (name, params) =&gt; <span class="hljs-string">`<span class="hljs-subst">${name}</span> &#x957F;&#x5EA6;&#x5FC5;&#x987B;&#x4E3A;<span class="hljs-subst">${params[0]}</span>&#x4F4D;`</span>,
          max: (name, params) =&gt; <span class="hljs-string">`<span class="hljs-subst">${name}</span> &#x957F;&#x5EA6;&#x6700;&#x5927;&#x4E3A;<span class="hljs-subst">${params[0]}</span>&#x4F4D;`</span>,
          min: (name, params) =&gt; <span class="hljs-string">`<span class="hljs-subst">${name}</span> &#x957F;&#x5EA6;&#x6700;&#x5C0F;&#x4E3A;<span class="hljs-subst">${params[0]}</span>&#x4F4D;`</span>,
        },
      },
    };
    Validator.localize(dict);
  },
  addRules() {
    Validator.extend(<span class="hljs-string">&apos;mobile&apos;</span>, {
      getMessage: field =&gt; <span class="hljs-string">`<span class="hljs-subst">${field}</span> &#x8BF7;&#x8F93;&#x5165;&#x6B63;&#x786E;&#x7684;&#x624B;&#x673A;&#x53F7;&#x7801;`</span>,
      validate: value =&gt; value.length === <span class="hljs-number">11</span> &amp;&amp; <span class="hljs-regexp">/^((13|14|15|17|18)[0-9]{1}\d{8})$/</span>.test(value),
    });
    Validator.extend(<span class="hljs-string">&apos;Number&apos;</span>, {
      getMessage: field =&gt; <span class="hljs-string">`<span class="hljs-subst">${field}</span> &#x8BF7;&#x8F93;&#x5165;&#x6570;&#x5B57;`</span>,
      validate: value =&gt; <span class="hljs-regexp">/^-?\d+(\.\d+)?$/</span>.test(value),
    });
    Validator.extend(<span class="hljs-string">&apos;phone&apos;</span>, {
      getMessage: field =&gt; <span class="hljs-string">`<span class="hljs-subst">${field}</span> &#x8BF7;&#x8F93;&#x5165;&#x6B63;&#x786E;&#x7684;&#x624B;&#x673A;&#x53F7;&#x7801;`</span>,
      validate: value =&gt; <span class="hljs-regexp">/^1\d{10}$/gi</span>.test(value) || <span class="hljs-regexp">/^0\d{2,3}-?\d{7,8}$/</span>.test(value),
    });
    Validator.extend(<span class="hljs-string">&apos;phonestr&apos;</span>, {
      getMessage: field =&gt; <span class="hljs-string">`<span class="hljs-subst">${field}</span> &#x8BF7;&#x8F93;&#x5165;&#x6B63;&#x786E;&#x7684;&#x624B;&#x673A;&#x53F7;&#x7801;`</span>,
      validate: value =&gt; <span class="hljs-regexp">/^(\+|\d)\d{10,12}/</span>.test(value),
    });
    Validator.extend(<span class="hljs-string">&apos;password&apos;</span>, {
      getMessage: field =&gt; <span class="hljs-string">`<span class="hljs-subst">${field}</span> &#x4E0D;&#x7B26;&#x5408;&#x89C4;&#x5219;&#x8981;&#x6C42;&#xFF0C;&#x8BF7;&#x8F93;&#x5165;6-20&#x4E2A;&#x5B57;&#x6BCD;&#x3001;&#x6570;&#x5B57;&#x3001;&#x4E0B;&#x5212;&#x7EBF;&#x6216;&#x51CF;&#x53F7;&#xFF0C;&#x4EE5;&#x5B57;&#x6BCD;&#x5F00;&#x5934;!`</span>,
      validate: value =&gt; <span class="hljs-regexp">/^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z\d]{6,32}$/</span>.test(value),
    });
    Validator.extend(<span class="hljs-string">&apos;wechat&apos;</span>, {
      getMessage: field =&gt; <span class="hljs-string">`<span class="hljs-subst">${field}</span> &#x4E0D;&#x7B26;&#x5408;&#x89C4;&#x5219;&#x8981;&#x6C42;&#xFF0C;&#x8BF7;&#x8F93;&#x5165;6-20&#x4E2A;&#x5B57;&#x6BCD;&#x3001;&#x6570;&#x5B57;&#x3001;&#x4E0B;&#x5212;&#x7EBF;&#x6216;&#x51CF;&#x53F7;&#xFF0C;&#x4EE5;&#x5B57;&#x6BCD;&#x5F00;&#x5934;!`</span>,
      validate: value =&gt; <span class="hljs-regexp">/^[a-zA-Z]{1}[-_a-zA-Z0-9]{5,19}$/</span>.test(value),
    });
  },
};
</code></pre>
<h3 id="&#x4FEE;&#x6539;&#x9ED8;&#x8BA4;&#x63D0;&#x793A;"><a name="&#x4FEE;&#x6539;&#x9ED8;&#x8BA4;&#x63D0;&#x793A;" class="anchor-navigation-ex-anchor" href="#&#x4FEE;&#x6539;&#x9ED8;&#x8BA4;&#x63D0;&#x793A;"><i class="fa fa-link" aria-hidden="true"></i></a>1.2.1. &#x4FEE;&#x6539;&#x9ED8;&#x8BA4;&#x63D0;&#x793A;</h3>
<p>&#x5728;<a href="">changeMessage()</a>&#x65B9;&#x6CD5;&#x4E2D;&#xFF0C;&#x6211;&#x4EEC;&#x5DF2;&#x7ECF;&#x66F4;&#x6539;&#x4E86;required,length,max,min&#x7B49;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;&#x7684;&#x9ED8;&#x8BA4;&#x63D0;&#x793A;&#xFF0C;&#x53EF;&#x4EE5;&#x53C2;&#x7167;&#x8BE5;&#x914D;&#x7F6E;&#xFF0C;&#x7EE7;&#x7EED;&#x5728;&#x4E0B;&#x9762;&#x6DFB;&#x52A0;&#x76F8;&#x5173;&#x65B9;&#x6CD5;&#x4EE5;&#x53CA;&#x63D0;&#x793A;&#x6D88;&#x606F;&#x7B49;&#x3002;</p>
<h3 id="&#x6DFB;&#x52A0;&#x81EA;&#x5B9A;&#x4E49;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;"><a name="&#x6DFB;&#x52A0;&#x81EA;&#x5B9A;&#x4E49;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;" class="anchor-navigation-ex-anchor" href="#&#x6DFB;&#x52A0;&#x81EA;&#x5B9A;&#x4E49;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;"><i class="fa fa-link" aria-hidden="true"></i></a>1.2.2. &#x6DFB;&#x52A0;&#x81EA;&#x5B9A;&#x4E49;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;</h3>
<ul>
<li>&#x5728;<a href="">addRules()</a>&#x65B9;&#x6CD5;&#x4E2D;&#xFF0C;&#x6211;&#x4EEC;&#x5DF2;&#x7ECF;&#x65B0;&#x589E;&#x4E86;&#x76F8;&#x5173;&#x7684;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;&#xFF0C;&#x53EF;&#x4EE5;&#x53C2;&#x7167;&#x65B9;&#x6CD5;&#x7EE7;&#x7EED;&#x5728;&#x4E0B;&#x9762;&#x6DFB;&#x52A0;&#x76F8;&#x5173;&#x7684;&#x81EA;&#x5B9A;&#x4E49;&#x6821;&#x9A8C;&#x3002;<ul>
<li>getMessage: &#x8FD4;&#x56DE;&#x6821;&#x9A8C;&#x4E0D;&#x901A;&#x8FC7;&#x65F6;&#x7684;&#x6D88;&#x606F;&#x901A;&#x77E5;&#xFF0C;field&#x4E3A;&#x8BE5;&#x5B57;&#x6BB5;&#x7684;&#x540D;&#x79F0;&#x3002;</li>
<li>validate: &#x6821;&#x9A8C;&#x65B9;&#x6CD5;&#xFF0C;&#x7ED3;&#x679C;&#x8FD4;&#x56DE;true&#x6216;false&#x3002;</li>
</ul>
</li>
</ul>
<h2 id="&#x6821;&#x9A8C;&#x65B9;&#x6CD5;&#x5217;&#x8868;"><a name="&#x6821;&#x9A8C;&#x65B9;&#x6CD5;&#x5217;&#x8868;" class="anchor-navigation-ex-anchor" href="#&#x6821;&#x9A8C;&#x65B9;&#x6CD5;&#x5217;&#x8868;"><i class="fa fa-link" aria-hidden="true"></i></a>1.3. &#x6821;&#x9A8C;&#x65B9;&#x6CD5;&#x5217;&#x8868;</h2>
<h3 id="vee-validate&#x5185;&#x7F6E;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;"><a name="vee-validate&#x5185;&#x7F6E;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;" class="anchor-navigation-ex-anchor" href="#vee-validate&#x5185;&#x7F6E;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;"><i class="fa fa-link" aria-hidden="true"></i></a>1.3.1. vee-validate&#x5185;&#x7F6E;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;</h3>
<ul>
<li><a href="https://github.com/baianat/vee-validate" target="_blank">vee-validate</a>&#x6240;&#x6709;&#x5185;&#x7F6E;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;&#x8BF7;&#x67E5;&#x9605;<a href="https://baianat.github.io/vee-validate/guide/rules.html" target="_blank">vee-validate&#x5B98;&#x7F51;&#x6587;&#x6863;</a></li>
<li><a href="https://baianat.github.io/vee-validate/guide/getting-started.html#basic-example" target="_blank">&#x7528;&#x6CD5;&#x53C2;&#x8003;</a></li>
</ul>
<h3 id="&#x81EA;&#x5B9A;&#x4E49;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;"><a name="&#x81EA;&#x5B9A;&#x4E49;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;" class="anchor-navigation-ex-anchor" href="#&#x81EA;&#x5B9A;&#x4E49;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;"><i class="fa fa-link" aria-hidden="true"></i></a>1.3.2. &#x81EA;&#x5B9A;&#x4E49;&#x6821;&#x9A8C;&#x65B9;&#x6CD5;</h3>
<ul>
<li><a href="">mobile</a> &#x5BF9;11&#x4F4D;&#x4EE5;&#x53CA;8&#x4F4D;&#x7535;&#x8BDD;&#x53F7;&#x7801;&#x505A;&#x6821;&#x9A8C;&#xFF0C;&#x4E0D;&#x6821;&#x9A8C;&#x516B;&#x4F4D;&#x7535;&#x8BDD;&#x53F7;&#x7801;&#x5F00;&#x59CB;&#x662F;&#x5426;&#x4E3A;0&#x3002;</li>
<li><a href="">Number</a> &#x5BF9;&#x6570;&#x5B57;&#x505A;&#x6821;&#x9A8C;&#x3002;</li>
<li><a href="">phone</a> &#x5BF9;11&#x4F4D;&#x4EE5;&#x53CA;8&#x4F4D;&#x7535;&#x8BDD;&#x53F7;&#x7801;&#x505A;&#x6821;&#x9A8C;&#xFF0C;&#x516B;&#x4F4D;&#x7535;&#x8BDD;&#x53F7;&#x7801;&#x5F00;&#x59CB;&#x5FC5;&#x987B;&#x4E3A;0&#xFF0C;&#x5426;&#x5219;&#x6821;&#x9A8C;&#x4E0D;&#x901A;&#x8FC7;&#x3002;</li>
<li><a href="">phonestr</a> &#x4EC5;&#x5BF9;&#x624B;&#x673A;&#x53F7;&#x7801;&#x505A;&#x6821;&#x9A8C;&#xFF0C;&#x5982;&#x679C;&#x624B;&#x673A;&#x53F7;&#x7801;&#x524D;&#x9762;&#x6709;+86&#x7B49;&#x4E5F;&#x5C06;&#x6821;&#x9A8C;&#x901A;&#x8FC7;&#x3002;</li>
<li><a href="">password</a> &#x5BF9;&#x6211;&#x4EEC;diboot&#x5F00;&#x53D1;&#x5E73;&#x53F0;&#x9ED8;&#x8BA4;&#x7684;&#x5BC6;&#x7801;&#x6821;&#x9A8C;&#xFF0C;&#x6821;&#x9A8C;&#x89C4;&#x5219;&#x4E3A;6&#x4F4D;&#x53CA;&#x4EE5;&#x4E0A;&#x4E14;&#x987B;&#x5305;&#x542B;&#x5927;&#x5C0F;&#x5199;&#x5B57;&#x6BCD;&#x53CA;&#x6570;&#x5B57;&#x3002;</li>
<li><a href="">wechat</a> &#x5BF9;&#x4F01;&#x4E1A;&#x5FAE;&#x4FE1;&#x8D26;&#x53F7;&#x7684;&#x6821;&#x9A8C;&#xFF0C;&#x6821;&#x9A8C;&#x89C4;&#x5219;&#x4E3A;6-20&#x4E2A;&#x5B57;&#x6BCD;&#x3001;&#x6570;&#x5B57;&#x3001;&#x4E0B;&#x5212;&#x7EBF;&#x6216;&#x51CF;&#x53F7;&#xFF0C;&#x4EE5;&#x5B57;&#x6BCD;&#x5F00;&#x5934;&#x3002;</li>
</ul>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                

            </div>

            
                
                <a href="过滤器.html" class="navigation navigation-prev " aria-label="Previous page: 过滤器">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="接口数据格式.html" class="navigation navigation-next " aria-label="Next page: 接口数据格式">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"表单验证","level":"1.3.3","depth":2,"next":{"title":"接口数据格式","level":"1.3.4","depth":2,"path":"基础/接口数据格式.md","ref":"基础/接口数据格式.md","articles":[]},"previous":{"title":"过滤器","level":"1.3.2","depth":2,"path":"基础/过滤器.md","ref":"基础/过滤器.md","articles":[]},"dir":"ltr"},"config":{"plugins":["-sharing","sharing-plus","anchor-navigation-ex","theme-vuejs-2"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"search":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"theme-vuejs-2":{},"fontsettings":{"theme":"white","family":"sans","size":2},"highlight":{},"anchor-navigation-ex":{"mode":"float","pageTop":{"level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false},"showLevel":true,"tocLevel1Icon":"fa fa-hand-o-right","tocLevel2Icon":"fa fa-hand-o-right","tocLevel3Icon":"fa fa-hand-o-right","showGoTop":true,"isShowTocTitleIcon":true,"printLog":false,"multipleH1":true,"associatedWithSummary":true,"float":{"floatIcon":"fa fa-navicon","level1Icon":"","level2Icon":"","level3Icon":"","showLevelIcon":false}},"sharing":{"qq":true,"all":["weibo","qq","linkedin","qzone","douban"],"douban":false,"weibo":true,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":false,"messenger":false,"line":false,"vk":false,"pocket":false,"viber":false,"stumbleupon":false,"qzone":true,"linkedin":false},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Diboot移动端基础项目","gitbook":"*","description":"Diboot移动端基础项目"},"file":{"path":"基础/表单验证.md","mtime":"2018-11-08T08:51:40.893Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-11-10T15:10:03.285Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

